package com.yc.clone;

import java.util.Date;

public class TestClone {
	
	public static void main(String[] args) {
//		ShallowCopy sc = new ShallowCopy();
//		sc.setBegin(new Date());
//		System.out.println(sc.getBegin().getTime());
//		
//		ShallowCopy sc_clone = (ShallowCopy) sc.clone();
//		System.out.println(sc_clone.getBegin().getTime());
		
		
		DeepCopy dc = new DeepCopy();
		dc.setBegin(new Date());
		System.out.println(dc.getBegin().getTime());
		
		DeepCopy dc_clone = dc.clone();
		System.out.println(dc_clone.getBegin().getTime());
	}

}
